package com.flying.flow.participant;

import java.util.Map;

import com.flying.common.util.Utils;
import com.flying.framework.annotation.Service;
import com.flying.framework.service.AbstractService;

@Service("ParticipantProviderFactory")
public class ParticipantProviderFactory extends AbstractService{
	private static Map<String, String> providerServices = Utils.newHashMap();
	static {
		providerServices.put("demo", "DemoParticipantProvider");
		providerServices.put("role", "RoleParticipantProvider");
	}
	public ParticipantProvider getParticipantProvider(String type) {
		final String sid = this.serviceConfig.getConfig(type);
		ParticipantProvider p = this.module.getService(sid);
		return p;
	}
}
